package com.hmall.search.service;

import com.hmall.common.dto.PageDTO;
import com.hmall.search.dto.ItemDoc;
import com.hmall.search.pojo.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author liCuiPing
 * @since 2022/12/9 16:54
 */
public interface SearchService {
    /**
     * 自动补全
     * @param key
     * @return
     */
    public List<String> suggestionSearch( String key);

    /**
     * 聚合
     * @return
     */
    Map<String, List<String>> filter(RequestParam requestParam);

    /**
     * list分页
     * @param requestParam
     * @return
     */
    PageDTO<ItemDoc> listPage(RequestParam requestParam);

    /**
     * 通过id保存item
     * @param id
     */
    void saveItemByid(Long id);

    /**
     * 通过id删除item
     * @param id
     */
    void deleteItemByid(Long id);
}
